﻿{% extends "layout.html" %}

{% block title%}HMS home - Categories{% endblock %}

{% block content %}
<p>
	{% if object_list %}
	<div class="span-24 last">
	    <div class="Section">
	        <div class="SectionHeading">
	            Categorias
	            <div class="SectionHeadingMenu">
	                <a href="">Alta de categorias</a>
	            </div>
	        </div>
	        <div class="SectionContent">
	           <table class="DataTable">
	               <tr>
	                   <th>Categoria</th>
	                   <th>Equipos inscriptos</th>
	                   <th>Acciones</th>
	               </tr>
		           {% for category in object_list %}
		               <tr>
		                   <td><a href="{{ category.get_absolute_url }}">{{ category.description }}</a></td>
		                   <td>{{ category.teamcategorybyclub_set.all.count }}</td>
		                   <td><a href="#" class="edit">Editar</a></td>
		               </tr>
		           {% endfor %}
	           </table>
            </div>
        </div>
    </div>
	{% else %}
	   <p>No hay categorias cargadas por el momento.</p>
	{% endif %}
</p>
{% endblock %}
